-
Notifications
You must be signed in to change notification settings - Fork 354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add read ACL check when no namespace protection [DHS2-16134] #15754
Conversation
…ring [DHIS2-16134]
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #15754 +/- ##
=========================================
Coverage 66.31% 66.31%
- Complexity 31374 31380 +6
=========================================
Files 3481 3481
Lines 129925 129930 +5
Branches 15197 15199 +2
=========================================
+ Hits 86162 86166 +4
- Misses 36672 36673 +1
Partials 7091 7091
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1 file with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
Kudos, SonarCloud Quality Gate passed! |
Summary
This feature adds an ACL check to
DatastoreService#readProtectedIn
when there is no namespace protection. The following endpoints can be used to test the feature:GET
/api/dataStore/{namespace}/{key}
GET
/api/dataStore/{namespace}/{key}/metaData
Background
There was already an existing read
Sharing
check performed for namespace entries that had namespace protection.The read check has been updated to incorporate scenarios where there is no namespace protection in place (namespace protection is only setup programmatically currently. All namespaces setup through the API will not have any namespace protection).
DatastoreEntry Read criteria when no namespace protection
Testing
Automated
Manual
To manually test this feature, the following endpoints can be used:
GET
/api/dataStore/{namespace}/{key}
GET
/api/dataStore/{namespace}/{key}/metaData
To add an entry to a new namespace:
POST
/api/dataStore/{myNamespace}/{myKey}
with sample bodyTo get the ID of a DataEntry use:
GET
/api/dataStore/{namespace}/{key}/metaData
To remove public access of a DataEntry:
POST
/api/sharing?type=dataStore&id={dataStoreEntryId}
with bodyTo share access of a DataEntry with another User & remove public access:
POST
/api/sharing?type=dataStore&id={dataStoreEntryId}
with bodyTo share access with a UserGroup & remove public access use: